<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<title>SKDB管理系统 | 修改新闻</title>
		
	<!-- Mobile Metas -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		
	<!-- Import google fonts -->
    <link href="http://fonts.useso.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css" />
       
	<!-- Favicon and touch icons -->
	<link rel="shortcut icon" href="assets/ico/favicon.ico" type="image/x-icon" />
	<link rel="apple-touch-icon" href="assets/ico/apple-touch-icon.png" />
	<link rel="apple-touch-icon" sizes="57x57" href="assets/ico/apple-touch-icon-57x57.png" />
	<link rel="apple-touch-icon" sizes="72x72" href="assets/ico/apple-touch-icon-72x72.png" />
	<link rel="apple-touch-icon" sizes="76x76" href="assets/ico/apple-touch-icon-76x76.png" />
	<link rel="apple-touch-icon" sizes="114x114" href="assets/ico/apple-touch-icon-114x114.png" />
	<link rel="apple-touch-icon" sizes="120x120" href="assets/ico/apple-touch-icon-120x120.png" />
	<link rel="apple-touch-icon" sizes="144x144" href="assets/ico/apple-touch-icon-144x144.png" />
	<link rel="apple-touch-icon" sizes="152x152" href="assets/ico/apple-touch-icon-152x152.png" />
	
    <!-- start: CSS file-->
		
	<!-- Vendor CSS-->
	<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
	<link href="assets/vendor/skycons/css/skycons.css" rel="stylesheet" />
	<link href="assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
	
	<!-- Plugins CSS-->
	<link href="assets/plugins/bootkit/css/bootkit.css" rel="stylesheet" />
	<link href="assets/plugins/fullcalendar/css/fullcalendar.css" rel="stylesheet" />
	<link href="assets/plugins/jquery-ui/css/jquery-ui-1.10.4.min.css" rel="stylesheet" />					
	
	<!-- Theme CSS -->
	<link href="assets/css/jquery.mmenu.css" rel="stylesheet" />
	
	<!-- Page CSS -->		
	<link href="assets/css/style.css" rel="stylesheet" />
	<link href="assets/css/add-ons.min.css" rel="stylesheet" />
	
	<!-- end: CSS file-->	
    
	
	<!-- Head Libs -->
	<script src="assets/plugins/modernizr/js/modernizr.js"></script>
	
	<!--UEditor Libs-->
	<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
   	<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script>
   	<script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script>
	
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
		<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
  </head>
  
  <body>
    <!-- Start: Header -->
	<div class="navbar" role="navigation">
		<div class="container-fluid container-nav">
			<!-- Navbar Action -->
			<ul class="nav navbar-nav navbar-actions navbar-left">
				<li class="visible-md visible-lg"><a href="index.html#" id="main-menu-toggle"><i class="fa fa-th-large"></i></a></li>
				<li class="visible-xs visible-sm"><a href="index.html#" id="sidebar-menu"><i class="fa fa-navicon"></i></a></li>			
			</ul>
			<!-- Navbar Left -->
				
			<!-- Navbar Right -->
			<div class="navbar-right">
				<!-- Notifications -->
				<!-- End Notifications -->
				<!-- Userbox -->
				<div class="userbox">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<div class="profile-info">
							<span class="name">admin</span>
							<!--<span class="role">Developer</span>-->
						</div>			
						<i class="fa custom-caret"></i>
					</a>
					<div class="dropdown-menu">
						<ul class="list-unstyled">
							<li class="dropdown-menu-header bk-bg-white bk-margin-top-15">						
								<div class="progress progress-xs  progress-striped active">
									<div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
										60%
									</div>
								</div>			
							</li>
							<li>
								<a href="login.html"><i class="fa fa-power-off"></i> 退出系统</a>
							</li>
						</ul>
					</div>
				</div>
				<!-- End Userbox -->
			</div>
			<!-- End Navbar Right -->
		</div>		
	</div>
	<!-- End: Header -->
		
	<!-- Start: Content -->
	<div class="container-fluid content">	
		<div class="row">
			
			<!-- Sidebar -->
			<div class="sidebar" >
				<div class="sidebar-collapse">
					<!-- Sidebar Header Logo-->
					<div class="sidebar-header">
						<img src="assets/img/logo.png" class="img-responsive" alt="山科大后台管理" />
					</div>
					<!-- Sidebar Menu-->
					<div class="sidebar-menu">
						<nav id="menu" class="nav-main" role="navigation">
							<ul class="nav nav-sidebar" style="height: 580px;">
								<div class="divider2"></div>
								<li>
									<a href="index.jsp">
										<i class="icon fa fa-home" aria-hidden="true"></i><span> 首页</span>
									</a>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-copy" aria-hidden="true"></i><span> 账户管理</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="account_query.jsp"><span class="text"> 查询</span></a></li>
										<li><a href="add_user.jsp"><span class="text"> 开户</span></a></li>						
										<li><a href="trade_detail.jsp"><span class="text"> 交易明细</span></a></li>
										<li><a href="save_detail.jsp"><span class="text"> 存取明细</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-list-alt" aria-hidden="true"></i><span> 网上银行</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="online_bank_query.jsp"><span class="text"> 查询</span></a></li>
										<li><a href="modify_login_pwd.jsp"><span class="text"> 修改登录密码</span></a></li>
										<li><a href="online_modify.jsp"><span class="text"> 开通/关闭网银</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-list-alt" aria-hidden="true"></i><span> 银行卡管理</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="account_query.jsp"><span class="text"> 信息查询</span></a></li>
										<li><a href="add_card.jsp"><span class="text"> 办理银行卡</span></a></li>
										<li><a href="modify_pay_pwd.jsp"><span class="text"> 修改支付密码</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-random" aria-hidden="true"></i><span> 存取款</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="save_cash.jsp"><span class="text"> 存款</span></a></li>
										<li><a href="get_cash.jsp"><span class="text"> 取款</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-tasks" aria-hidden="true"></i><span> 转账汇款</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="remit_cash.jsp"><span class="text"> 活期转账汇款</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-bolt" aria-hidden="true"></i><span> 新闻管理</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="news_query.jsp"><span class="text"> 查询</span></a></li>
										<li><a href="add_news.jsp"><span class="text"> 添加新闻</span></a></li>
									</ul>
								</li>
								
								<li class="nav-parent">
									<a>
										<i class="fa fa-tasks" aria-hidden="true"></i><span> 银行对账</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="check_account.jsp"><span class="text"> 每日对账</span></a></li>
									</ul>
								</li>
									
								<li class="nav-parent">
									<a>
										<i class="fa fa-bolt" aria-hidden="true"></i><span> 管理员操作</span>
									</a>
									<ul class="nav nav-children">
										<li><a href="admin_query.jsp"><span class="text"> 查询</span></a></li>
										<li><a href="add_admin.jsp"><span class="text"> 添加管理员</span></a></li>
										<li><a href="login_log_query.jsp"><span class="text">登录日志查询</span></a></li>
										<li><a href="mgr_log_query.jsp"><span class="text">操作日志查询</span></a></li>
									</ul>
								</li>
							</ul>
						</nav>
					</div>
					<!-- End Sidebar Menu-->
				</div>
				<!-- Sidebar Footer-->
				<div class="sidebar-footer">
					(c)2015 SKDB All Rights Reserved
				</div>
				<!-- End Sidebar Footer-->
			</div>
			<!-- End Sidebar -->
		
			<!-- Main Page -->
			<div class="main ">
				<!-- Page Header -->
				<div class="page-header">
					<div class="pull-left">
						<ol class="breadcrumb visible-sm visible-md visible-lg">								
							<li><a href="index.html"><i class="icon fa fa-home"></i> 修改新闻</a></li>
						</ol>						
					</div>					
				</div>
				<!-- End Page Header -->
				<div>
					<form action="add_news" method="post">
						<input type="hidden" id="type" value="${news.ntype}">
						<input type="hidden" id="id" value="${news.nid}">
						新闻标题:<input type="text" name="ntitle" id="ntitle" value="${news.ntitle }"/><br /><br />
						新闻类别: <select id="ntype" name="ntype">
									<c:forEach items="${newsTypeList}" var="type">
										<option value="${type.newsTypeId}">${type.newsTypeName}</option>
									</c:forEach>
								</select><br><br>
						新闻内容:<textarea id="editor" name="ncontent" type="text/plain" style="width:1024px;height:500px;">
								${news.ncontent }
								</textarea>
						<input type="button" id="update" value="更新"/>
					</form>
				</div>
				<!-- End Main Page -->	
				<!-- Usage -->
				<!-- End Usage -->
			</div>
		</div><!--/container-->
	</div>
	
	<!-- start: JavaScript-->
		
	<!-- Vendor JS-->				
	<script src="assets/vendor/js/jquery.min.js"></script>
	<script src="assets/vendor/js/jquery-2.1.1.min.js"></script>
	<script src="assets/vendor/js/jquery-migrate-1.2.1.min.js"></script>
	<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/vendor/skycons/js/skycons.js"></script>	
	
	<!-- Plugins JS-->
	<script src="assets/plugins/jquery-ui/js/jquery-ui-1.10.4.min.js"></script>
	<script src="assets/plugins/moment/js/moment.min.js"></script>	
	<script src="assets/plugins/fullcalendar/js/fullcalendar.min.js"></script>			
	
	<!-- Theme JS -->		
	<script src="assets/js/jquery.mmenu.min.js"></script>
	<script src="assets/js/core.min.js"></script>
	
	<!-- Pages JS -->
	<script src="assets/js/pages/mailbox.js"></script>
	
	<script src="javascript/modify_news.js"></script>
		
	<!-- UEditor JS-->
	<script type="text/javascript">
	    //实例化编辑器
	    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
	    var ue = UE.getEditor('editor');
	
	
	    function isFocus(e){
	        alert(UE.getEditor('editor').isFocus());
	        UE.dom.domUtils.preventDefault(e)
	    }
	    function setblur(e){
	        UE.getEditor('editor').blur();
	        UE.dom.domUtils.preventDefault(e)
	    }
	    function insertHtml() {
	        var value = prompt('插入html代码', '');
	        UE.getEditor('editor').execCommand('insertHtml', value)
	    }
	    function createEditor() {
	        enableBtn();
	        UE.getEditor('editor');
	    }
	    function getAllHtml() {
	        alert(UE.getEditor('editor').getAllHtml())
	    }
	    function getContent() {
	        var arr = [];
	        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
	        arr.push("内容为：");
	        arr.push(UE.getEditor('editor').getContent());
	        alert(arr.join("\n"));
	    }
	    function getPlainTxt() {
	        var arr = [];
	        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
	        arr.push("内容为：");
	        arr.push(UE.getEditor('editor').getPlainTxt());
	        alert(arr.join('\n'))
	    }
	    function setContent(isAppendTo) {
	        var arr = [];
	        arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
	        UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
	        alert(arr.join("\n"));
	    }
	    function setDisabled() {
	        UE.getEditor('editor').setDisabled('fullscreen');
	        disableBtn("enable");
	    }
	
	    function setEnabled() {
	        UE.getEditor('editor').setEnabled();
	        enableBtn();
	    }
	
	    function getText() {
	        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
	        var range = UE.getEditor('editor').selection.getRange();
	        range.select();
	        var txt = UE.getEditor('editor').selection.getText();
	        alert(txt)
	    }
	
	    function getContentTxt() {
	        var arr = [];
	        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
	        arr.push("编辑器的纯文本内容为：");
	        arr.push(UE.getEditor('editor').getContentTxt());
	        alert(arr.join("\n"));
	    }
	    function hasContent() {
	        var arr = [];
	        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
	        arr.push("判断结果为：");
	        arr.push(UE.getEditor('editor').hasContents());
	        alert(arr.join("\n"));
	    }
	    function setFocus() {
	        UE.getEditor('editor').focus();
	    }
	    function deleteEditor() {
	        disableBtn();
	        UE.getEditor('editor').destroy();
	    }
	    function disableBtn(str) {
	        var div = document.getElementById('btns');
	        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
	        for (var i = 0, btn; btn = btns[i++];) {
	            if (btn.id == str) {
	                UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
	            } else {
	                btn.setAttribute("disabled", "true");
	            }
	        }
	    }
	    function enableBtn() {
	        var div = document.getElementById('btns');
	        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
	        for (var i = 0, btn; btn = btns[i++];) {
	            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
	        }
	    }
	
	    function getLocalData () {
	        alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
	    }
	
	    function clearLocalData () {
	        UE.getEditor('editor').execCommand( "clearlocaldata" );
	        alert("已清空草稿箱")
	    }
	</script>
	<!-- end: JavaScript-->	
  </body>
</html>
